<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" th:href="@{/css/plugins/layui/css/layui.css}">
</head>
<body>
<div>
    <div class="layui-form">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">姓名</label>
                <div class="layui-input-inline layui-input-wrap">
                    <input type="text" id="studentName" name="studentName" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">性别</label>
                <div class="layui-input-inline layui-input-wrap">
                    <input type="text" id="gender"   name="gender"  class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">所属班级</label>
                <div class="layui-input-inline layui-input-wrap">
                    <select id="claId" name="claId" th:with="clas=${@claService.list()}">
                        <option value="">请选择</option>
                        <option th:each="cla : ${clas}" th:text="${cla.claName}" th:value="${cla.claId}"></option>
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">所属宿舍</label>
                <div class="layui-input-inline layui-input-wrap">
                    <select id="hostelId" name="hostelId" th:with="hostels=${@hostelService.list()}">
                        <option value="">请选择</option>
                        <option th:each="hostel : ${hostels}" th:text="${hostel.hostelName}" th:value="${hostel.hostelId}"></option>
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">所属专业</label>
                <div class="layui-input-inline layui-input-wrap">
                    <select id="majorId" name="majorId" th:with="majors=${@majorService.list()}">
                        <option value="">请选择</option>
                        <option th:each="major : ${majors}" th:text="${major.majorName}" th:value="${major.majorId}"></option>
                    </select>
                </div>
            </div>
        </div>


    </div>
</div>
<script th:src="@{/js/jquery.min.js}"></script>
<script th:src="@{/js/plugins/layui/layui.js}"></script>
<script>
    // 异步请求加载部门列表
    layui.use(function (){
        var laydate = layui.laydate;
        var form = layui.form;
        var $ = layui.$;
        laydate.render({
            elem: '#birthday',
            type: 'date'
        });

    })

</script>
</body>
</html>
